package com.xuan.judge.controller;

import com.xuan.api.domain.dto.JudgeSubmitDTO;
import com.xuan.api.domain.vo.UserQuestionResultVo;
import com.xuan.judge.service.JudgeService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/judge")
public class JudgeController {

    @Resource
    private JudgeService judgeService;

    @PostMapping("/doJudgeJavaCode")
    public UserQuestionResultVo doJudgeJavaCode(@RequestBody JudgeSubmitDTO judgeSubmitDTO) {
        return judgeService.doJudgeJavaCode(judgeSubmitDTO);
    }
}
